---
title: CloudWatch
description: Adapter for cloudwatch metrics.
location: https://istio.io/docs/reference/config/policy-and-telemetry/adapters/cloudwatch.html
layout: protoc-gen-docs
generator: protoc-gen-docs
supported_templates: logentry
supported_templates: metric
aliases:
  - /docs/reference/config/adapters/cloudwatch.html
number_of_entries: 4
---
<p>The CloudWatch adapter enables Istio to deliver metrics to
<a href="https://aws.amazon.com/cloudwatch/">Amazon CloudWatch</a>.
<a href="https://aws.amazon.com/cloudwatch/">Amazon CloudWatch</a> and logs to
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html">Amazon CloudWatchLogs</a>.</p>

<p>To push metrics and logs to CloudWatch using this adapter you must provide AWS credentials to the AWS SDK.
(see <a href="https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html">AWS docs</a>).</p>

<p>The handler configuration must contain the same metrics as the instance configuration.
The metrics specified in both instance and handler configurations will be sent to CloudWatch.</p>

<p>This adapter supports the <a href="https://istio.io/docs/reference/config/policy-and-telemetry/templates/metric/">metric template</a>.</p>

<h2 id="Params">Params</h2>
<section>
<p>Configuration for the <code>cloudwatch</code> adapter.</p>

<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr id="Params-namespace">
<td><code>namespace</code></td>
<td><code>string</code></td>
<td>
<p>CloudWatch metric namespace.</p>

</td>
</tr>
<tr id="Params-metric_info">
<td><code>metricInfo</code></td>
<td><code>map&lt;string,&nbsp;<a href="#Params-MetricDatum">Params.MetricDatum</a>&gt;</code></td>
<td>
<p>A map of Istio metric name to CloudWatch metric info.</p>

</td>
</tr>
<tr id="Params-log_group_name">
<td><code>logGroupName</code></td>
<td><code>string</code></td>
<td>
<p>The name of the log group in cloudwatchlogs.</p>

</td>
</tr>
<tr id="Params-log_stream_name">
<td><code>logStreamName</code></td>
<td><code>string</code></td>
<td>
<p>The name of the log stream in cloudwatchlogs.</p>

</td>
</tr>
<tr id="Params-logs">
<td><code>logs</code></td>
<td><code>map&lt;string,&nbsp;<a href="#Params-LogInfo">Params.LogInfo</a>&gt;</code></td>
<td>
<p>A map of Istio logentry name to CloudWatch logentry info.</p>

</td>
</tr>
</tbody>
</table>
</section>
<h2 id="Params-LogInfo">Params.LogInfo</h2>
<section>
<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr id="Params-LogInfo-payload_template">
<td><code>payloadTemplate</code></td>
<td><code>string</code></td>
<td>
<p>A golang text/template template that will be executed to construct the payload for this log entry.
It will be given the full set of variables for the log to use to construct its result.</p>

</td>
</tr>
</tbody>
</table>
</section>
<h2 id="Params-MetricDatum">Params.MetricDatum</h2>
<section>
<p>CloudWatch metric format.</p>

<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr id="Params-MetricDatum-unit">
<td><code>unit</code></td>
<td><code><a href="#Params-MetricDatum-Unit">Params.MetricDatum.Unit</a></code></td>
<td>
<p>The unit of the metric. Must be valid cloudwatch unit value.
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html">CloudWatch docs</a></p>

</td>
</tr>
</tbody>
</table>
</section>
<h2 id="Params-MetricDatum-Unit">Params.MetricDatum.Unit</h2>
<section>
<table class="enum-values">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr id="Params-MetricDatum-Unit-None">
<td><code>None</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Seconds">
<td><code>Seconds</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Microseconds">
<td><code>Microseconds</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Milliseconds">
<td><code>Milliseconds</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Count">
<td><code>Count</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Bytes">
<td><code>Bytes</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Kilobytes">
<td><code>Kilobytes</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Megabytes">
<td><code>Megabytes</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Gigabytes">
<td><code>Gigabytes</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Terabytes">
<td><code>Terabytes</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Bits">
<td><code>Bits</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Kilobits">
<td><code>Kilobits</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Megabits">
<td><code>Megabits</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Gigabits">
<td><code>Gigabits</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Terabits">
<td><code>Terabits</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Percent">
<td><code>Percent</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Bytes_Second">
<td><code>Bytes_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Kilobytes_Second">
<td><code>Kilobytes_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Megabytes_Second">
<td><code>Megabytes_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Gigabytes_Second">
<td><code>Gigabytes_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Terabytes_Second">
<td><code>Terabytes_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Bits_Second">
<td><code>Bits_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Kilobits_Second">
<td><code>Kilobits_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Megabits_Second">
<td><code>Megabits_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Gigabits_Second">
<td><code>Gigabits_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Terabits_Second">
<td><code>Terabits_Second</code></td>
<td>
</td>
</tr>
<tr id="Params-MetricDatum-Unit-Count_Second">
<td><code>Count_Second</code></td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
